home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
gfx
/
misc
/
gnuplot-3.7src.lha
/
gnuplot-3.7src
/
gnuplot-3.7.lha
/
gnuplot-3.7
/
commitvers
< prev
next >
Wrap
Text File
|
1998-04-15
|
1KB
|
55 lines
#! /usr/bin/perl
#
# $Id: commitvers,v 1.4 1996/02/26 22:21:49 drd Exp $
#
# update version.c and commit gnuplot
#
# this file will not be in any official release
#
if( ! -f "version.c" ) {
die "Doesn't look like a gnuplot dir to me\n";
}
rename("version.c",".#version.c") || die "Can't move version.c\n";
open(IN, ".#version.c") || die "Can't open version.c.\n";
open(OUT, ">version.c") || die "Can't create version.c\n";
$major="";
$minor="";
while(<IN>) {
if( /Id: version\.c,v ([0-9]+)\.([0-9]+) / ) {
$major=$1;
$minor=$2;
}
if( /^(.*patchlevel.*")(alpha |beta |)[^"]*(".*)$/ ) {
die if( $major eq "" || $minor eq "");
printf OUT "$1$2%d$3\n", $minor+1;
} elsif ( /^(.*date.*")[^"]*(".*)$/ ) {
$date=`date`;
chop $date;
print OUT "$1$date$2\n";
} else {
print OUT;
}
}
close IN;
close OUT;
$minor++;
print "New version is $major.$minor\n";
# check in configure.in first, so that we get the new revision number into
# configure
if(system("cvs diff configure.in >/dev/null")) {
system("cvs commit configure.in");
system("autoconf");
}
system("cvs commit");